import request from "@/utils/request";

export const workOrderManagement = {
  contextPath: '/equip', //按照实际应用修改成微服务的名�?//
  getdata: (data) => { //分页查询
    return request({
      url: workOrderManagement.contextPath + '/t-en-stock-task/getOrderPage',
      method: 'POST',
      data: data
    })
  },
  updateData: (data) => { //修改，删除
    return request({
      url: workOrderManagement.contextPath + '/t-en-stock-task/update',
      method: 'POST',
      data: data
    })
  },
  sendOrder: (data) => { //派单
    return request({
      url: workOrderManagement.contextPath + '/t-en-stock-task/sendOrder',
      method: 'POST',
      data: data
    })
  },
  getTaskOperateList: (code) => { //获取操作节点
    return request({
      url: workOrderManagement.contextPath + '/t-en-stock-task/getTaskProcess/' + code,
      method: 'POST',
      // data: data
    })
  },
  getTaskEquipList: (taskNo) => { //根据任务编码获取设备列表
    return request({
      url: workOrderManagement.contextPath + '/t-en-stock-task/getTaskEquipList/' + taskNo,
      method: 'POST',


    })
  },
  getTaskDefectList: (taskNo) => {
    return request({
      url: workOrderManagement.contextPath + '/t-en-stock-task/getTaskDefectList/' + taskNo,
      method: 'POST',

    })
  },
  updateDefect: (data) => {
    return request({
      url: workOrderManagement.contextPath + '/en-stock-equip-defect/update',
      method: 'POST',
      data: data
    })
  },
  defectDefect: (data) => {
    return request({
      url: workOrderManagement.contextPath + '/en-stock-equip-defect/page',
      method: 'POST',
      data: data
    })
  },
  getById: (code) => {
    return request({
      url: workOrderManagement.contextPath + '/t-en-stock-task/' + code,
      method: 'POST'
    })
  },
  getEquipStatistics: (code) => {//盘点结果
    return request({
      url: workOrderManagement.contextPath + '/t-en-stock-task/getEquipStatisticsByTaskNo/' + code,
      method: 'POST'
    })
  }

}
